Determines whether the collection contains an item with a specified
key.
Namespace:
Microsoft.ComponentStudio.ComponentPlatformInterface
Assembly:
Microsoft.ComponentStudio.ComponentPlatformInterface (in
microsoft.componentstudio.componentplatforminterface.dll)
Usage
Visual Basic |
Public Class SomeType1
End Class
Public Class SomeType2
End Class
Dim key As SomeType1
Dim returnValue As Boolean
Dim readOnlyKeyedCollection1 As ReadOnlyKeyedCollection(Of SomeType1, SomeType2)
returnValue = readOnlyKeyedCollection1.Contains(key)
|
Syntax
Visual Basic |
Public NotOverridable Function Contains( _
ByVal key As TKey _
) As Boolean
|
C# |
public sealed bool Contains(
TKey key
);
|
C++ |
public:
virtual bool arbitrary-name(
TKey key
) sealed = Contains;
|
J# |
public final boolean Contains(
TKey key
);
|
JScript |
JScript does not support Generics.
|
Parameters
- key
-
Key to search for.
Return Value
True if the item if found in the collection,
false
otherwise.
Thread Safety
Any public static (Shared in Visual
Basic) members of this type are thread safe. Any instance members
are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows XP Home Edition, Windows XP Professional, Windows Server
2003, Windows Vista, and Windows 2000
Target Platforms
See Also